Component({
    properties: {
        mes:Object
    },
    data: {
        state:'取消付款',money:123.01,num:2,discount:23.00,sta:0,name:''
    },

    attached:function (){
        const mes=this.data.mes;
        let a
        switch (mes.state){
            case 0:a='买家未付款';break;
            case 1:a='卖家已发货';break;
            case 2:a='交易成功';break;
            case 3:a='正在申请售后';break;
            case 4:a='取消付款';break;
            case 5:a='商家处理中';break;
            case 6:a='交易成功';break;
            default:a='交易成功'
        }
        this.setData({
            money:mes.money,
            sta:mes.state,
            state:a,
            name:mes.name,
            num:mes.num
        })
        // switch (mes.s)
        // data.
        console.log('展示',mes.state)
    },
    methods: {

    }
});
